-- GENERATED SPELL FOR [Shadow Lord Fel'dan] --


function spell0_9517(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9517', 3000, 1)
end

function spell1_9517(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(9081,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9517', 3000, 1)
end

function spell2_9517(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(16583,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9517', 668, 1)
end

function Sorts_9517(pUnit, Event)
local choix_sorts_9517 = math.random(0, 2)
if choix_sorts_9517 == 0 then
pUnit:RegisterEvent('spell0_9517', 1, 1)
end
if choix_sorts_9517 == 1 then
pUnit:RegisterEvent('spell1_9517', 1, 1)
end
if choix_sorts_9517 == 2 then
pUnit:RegisterEvent('spell2_9517', 1, 1)
end
end

function mob9517_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9517', math.random(1500, 3000), 1)
end

function mob9517_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9517_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9517_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9517, 1, 'mob9517_Action')
RegisterUnitEvent(9517, 2, 'mob9517_Leave')
RegisterUnitEvent(9517, 3, 'mob9517_Kill')
RegisterUnitEvent(9517, 4, 'mob9517_Die')
